using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CCSDocument
{
    public partial class CommisionFreezeForm : Form
    {
        public CommisionFreezeForm()
        {
            InitializeComponent();
        }

        private void ckDateReceived_CheckedChanged(object sender, EventArgs e)
        {
            if (ckDateReceived.Checked)
            {

                dtpFTime.Enabled = true;
                dtpTTime.Enabled = true;



            }
            else
            {


                dtpFTime.Checked = false;
                dtpTTime.Checked = false;

                dtpFTime.Enabled = false;
                dtpTTime.Enabled = false;


            }

        }

        private void CommisionFreezeForm_Load(object sender, EventArgs e)
        {
            cmbSelectType.SelectedIndex = 0;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            CCSDataBase.RealInfo pRealInfo1 = new CCSDataBase.RealInfo();

            for (int i = 0; i <= this.Controls.Count - 1; i++)
            {
                if (errorProvider1.GetError(this.Controls[i]) != "")
                {
                    MessageBox.Show(errorProvider1.GetError(this.Controls[i]));
                    this.DialogResult = DialogResult.Cancel;
                    return;

                }

            }

            this.DialogResult = DialogResult.OK;
        }
    }
}